OniTools
by Ian Patterson [ianpatt@pacbell.net]

An editor/viewer/patcher for Oni level data files.

Important

Only work on backup copies of your level files. It's possible to create a level file that will crash your computer when Oni tries to load it. Also, if you want to make a CMPO patch, you'll need to keep your original file around.

FAQ

1. How do I use this program?

Once you've launched the program, choose File:Open. Now, choose the .dat file you want to open. The .dat files are located in the GameDataFolder inside your Oni install folder. After loading the file, OniTools will display a list of all the resources in the level file. To view a resource, either double-click on the resource you want to view, or select it in the list and press return. The editor for the resource will open.

2. How do I edit resources?

First, open the resource that you want to edit. Then, select the field you want to edit and choose Resource:Edit Resource. An editor window will appear. Change the data in the field, then click OK. If you made a mistake, press Cancel.

3. How do I edit textures? (TXMP resources)

Open the texture you wish to edit. The texture will be displayed. Then, choose File:Export and save the texture. Edit the texture in your favorite image-editing application. Go back to the texture window and choose File:Import, and choose your new edited texture. The texture will be imported in to the level file.

Note: Any images you create must be the same size as the original textures, or you won't be able to import them in to the level file.

4. Why are some of the resources grayed out in the resource list?

If a resource is grayed out, it means that there is no editor for that resource type yet.

5. How do I create a CMPO patch file?

Choose File:Create CMPO patch. OniTools will prompt you for the edited file and the original level file. Then, OniTools will compare the files and write the patch file.

6. How do I use the M3GM viewer?

Rotation and positioning are controlled using the arrow keys, the comma key, and the period key. Without the shift key held down, left and right control x rotation, up and down control y rotation, and the comma and period key control z rotation. With the shift key held down, the rotation keys can be used to move the object.

7. How do I export sound files?

Open the SNDD resource you want to export. Then, choose File:Export. The file will be exported as an AIFF file.

8. How do I import resources?

In the resource list, select the resource you want to import over. Then, choose File:Import. The file will be imported over the selected resource.

9. What resource types are supported?

Type  Description
AKEV  Level data reference list
AKOT  Level data reference
BINA  Generic binary data reference
CBPI  Explosion animation list?
CBPM  Explosion animation list?
CRSA  Corpse list
CONS  Console definition
DOOR  Door definition
DPge  Diary page reference
FILM  Animation
HPge  Help page reference
IDXA  3D point index list
IGHH  In-game help overlay
IGPG  Console page
IGSA  String list
IGSt  String
Impt  Impact tree entry
IPge  Console page reference
KeyI  Key icon list
M3GA  3D model reference
M3GM  3D model
Mtrl  Material tree entry
OBAN  Animation
OFGA  [unknown]
ONCC  Character class
ONCV  Character variant
ONGS  Game settings
ONLD  Level order/name definition
ONLV  Level data reference list
ONOA  Level object list
ONVL  Character variant list
OSBD  Generic binary data reference
OTLF  [unknown]
PNTA  3D point list
PSpc  Interface object source rectangle
PSpL  Interface object source rectangle list
PSUI  Interface definition
SNDD  Sound data
StNA  String list
SUBT  Subtitle list
TRAM  Character animation/move
TRBS  Character data reference
TRCM  Character skeleton data reference
TRGA  Character skeleton part list
TRGE  Character skeleton part size
TRIG  Trigger definition
TRMA  Texture list
TRTA  [unknown]
TSFF  Font data reference
TSFL  [unknown, font related]
TSGA  Font size data
TStr  String
TURR  Turret data
TXAN  Animated texture data
TXCA  Texture coordinate list
TXMA  Texture list
TXMB  Large texture
TXMP  Large texture
VCRA  3D point list
WMCL  Window manager object list
WMDD  Dialog box
WMMB  Menu bar
WMM_  Menu
WPge  Weapon page

Note: not all these types are 100% complete. Many have missing information or incomplete entry descriptions.

10. My question isn't answered here. What should I do?

Send e-mail to me at ianpatt@pacbell.net. I'll try to respond as soon as I can.

Version History

1.5.1 - December 27, 2002
Typo fixed
Source code release fixed

1.5 - December 27, 2002
New resource types
Embedded M3GM textures added
Raw text dump added
Float editor bugfix
Object editor added

1.3 - March 6, 2001
New resource types
Fixed the M3GM viewer's missing polygon problem
Many additions/fixes to pre-existing resource types
Importing resources

1.2.1 - Febuary 21, 2001
Fixed texture import bug (caused all type 0 textures to not work)
New resource types

1.2 - Febuary 17, 2001
Bug fixes
Resource list coloring - now unsupported resources are drawn in gray
Importing textures
Version History created

Disclaimer

I am not responsible if OniTools crashes your computer, causes you to lose data, burns your house down, or does anything else undesirable. If it does, please contact me and I'll see what I can do about fixing the problem.

OniTools is a freeware program. The source is also included. However, OniTools is still Copyright  2000-2003 by Ian Patterson. All rights are reserved. If you want to distribute OniTools or use the source code for something, please contact me first.